#!/bin/bash
#
#
COMPRESS_PATH=~/BelRusProjetcts/libs/compress

echo "compress *.js and *.css"

#----------------MooTools---------------------
#
#cat ./mootools-core-1.3-full-nocompat.js ./mootools-more.js > moo.js
#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ./moo.js ./mootools-core-1.4.2-full-nocompat.js

#cp ./moo.js ../../js/moo.js
#rm ./moo.js
#echo "moo.js Done"

#-------------------------------------
# js
cat ./js/blure.js ./js/cv_new.js ./js/pictips.js ./js/mlform.js > temp.js
/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
              -classpath $COMPRESS_PATH/jargs-1.0.jar \
              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
              -o ../../incl/cvm.js ./temp.js

#cp ./temp.js ../../js/cvm.js
echo "*.js Done"

#-------------------------------------
# css
cat ./css/cv.css ./css/cv_new.css > temp.css
/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
              -classpath $COMPRESS_PATH/jargs-1.0.jar \
              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
              -o ../../incl/cvm.css ./temp.css

#cp ./temp.css ../../css/cv.css
echo "*.css Done"

#-------------------------------------
exit 0
